## 异常traceback模块打印异常信息

# 注意：使用traceback 要先import 引入包；
import traceback
try:
    print('1111111111111')
    num = 1/0
except:
    traceback.print_exc()

#执行结果：
'''
1111111111111
Traceback (most recent call last):
  File "D:\yfxdeve\python\pyProject\python\python入门\基础\异常traceback模块打印异常信息.py", line 6, in <module>
    num = 1/0
ZeroDivisionError: division by zero
'''
